package co.yixiang.modules.system.pay.enums;

import co.yixiang.modules.qeCode.param.QrCodeParam;
import co.yixiang.modules.system.pay.enums.operation.PayAction;
import co.yixiang.modules.system.pay.enums.operation.ext.StorePaySuccessAction;
import co.yixiang.modules.system.pay.enums.operation.ext.CardPaySuccessAction;
import co.yixiang.utils.BeanUtil;
import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 订单类型相关枚举
 */
@Getter
@AllArgsConstructor
public enum AliPayEnum {

	/**
	 * 大呷卡购买成功回调
	 */
	CARD_PAY_SUCCESS("城市合伙人","/pages/CityPartnerAction", CardPaySuccessAction.class),

	/**
	 * 商店支付成功回调
	 */
	STORE_PAY_SUCCESS("渠道","/pages/ChannelAction", StorePaySuccessAction.class);


	private final String desc;

	private final String url;

	private final Class<? extends PayAction> qrCodeAction;

	public void action(QrCodeParam param) {
		BeanUtil.getBean(qrCodeAction).doAction(param, this);
	}


}